import { request } from "@/utils/service"

/** 增 */
export function createAppletDataApi(data: any) {
  return request({
    url: "program/add",
    method: "post",
    data
  })
}

/** 删 */
export function deleteAppletDataApi(id: string) {
  return request({
    url: "program/del",
    method: "post",
    params: {
      id
    }
  })
}

/** 改 */
export function updateAppletDataApi(data: any) {
  return request({
    url: "program/update",
    method: "post",
    data
  })
}

/** 查 */
export function getAppletDataApi(params: any) {
  return request({
    url: "program/list",
    method: "get",
    params
  })
}

/*平台绑定团队*/

/** 增 */
export function createBindDataApi(data: any) {
  return request({
    url: "programRole/add",
    method: "post",
    data
  })
}

/** 删 */
export function deleteBindDataApi(id: string) {
  return request({
    url: "programRole/del",
    method: "post",
    params: {
      id
    }
  })
}

/** 改 */
export function updateBindDataApi(data: any) {
  return request({
    url: "programRole/update",
    method: "post",
    data
  })
}

/** 查 */
export function getBindDataApi(params: any) {
  return request({
    url: "programRole/list",
    method: "get",
    params
  })
}

/*轮播图*/

/** 增 */
export function createBannertDataApi(data: any) {
  return request({
    url: "carouselChart/add",
    method: "post",
    data
  })
}

/** 删 */
export function deleteBannerDataApi(id: string) {
  return request({
    url: "carouselChart/del",
    method: "post",
    params: {
      id
    }
  })
}

/** 改 */
export function updateBannerDataApi(data: any) {
  return request({
    url: "carouselChart/update",
    method: "post",
    data
  })
}

/** 查 */
export function getBannerDataApi(params: any) {
  return request({
    url: "carouselChart/list",
    method: "get",
    params
  })
}
